<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html>
<head>
    <title>员工管理</title>
    <link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css"> 
    <%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
    <script language="javascript"> 
		function firm(){//利用对话框返回的值 （true 或者 false）
		    if(confirm("你确要删除此数据？")){ 
		        return true;
		    }
		    else{ 
		        return false;
		    }
		}
		function gotoPage(pageOffset, pageSize) {
				var form = document.getElementsByTagName("form")[0];
				form.elements["pager.offset"].value = pageOffset;
				form.elements["pageSize"].value = pageSize;
				form.submit();
		}
	</script>
</head>
<body>
	<form action="${ctx}/operator.do?method=queryOperator" method="post">
	     <table width="100%" align="center">
	        <tr>
	            <th class="td_01" height="25px">用户名</th>
	            <th class="td_01">姓名</th>
	            <th class="td_01">角色名</th>
	            <th class="td_01">注册日期</th>
	            
	            <th class="td_01">状态</th>
	            <th class="td_01">操作</th>
	        </tr>
	        <logic:iterate id="operator" name="OperatorList" property="records">
	            <tr>
	                <td class="td_03"><bean:write name="operator" property="userid" /></td>
	                <td class="td_03"><bean:write name="operator" property="username" /></td> 
	                <td class="td_03"><bean:write name="operator" property="rolename" /></td>
	                <td class="td_03"><bean:write name="operator" property="addtime" format="yyyy-MM-dd hh:mm:ss"/></td>
	               
	                <td class="td_03">
	                    <logic:equal name="operator" property="ostate" value="0">正常</logic:equal>
	                    <logic:equal name="operator" property="ostate" value="1">不可用</logic:equal>
	                </td>
	                <td class="td_03">
	                    <a href="${ctx}/operator.do?method=queryOperatorById&userid=<bean:write name="operator" property="userid" />">修改</a>&nbsp;&nbsp;
	                    <a href="${ctx}/operator.do?method=deleteOperator&userid=<bean:write name="operator" property="userid" />" onclick="return firm();">删除</a>
	                </td>
	            </tr>
	        </logic:iterate>
	        <tr>
	        	 <td colspan="7" align="right">
		             <div style="float:left">&nbsp;&nbsp;
		             <a href="${ctx}/operator.do?method=toOperatorAdd">添&nbsp;&nbsp;加</a>
		             </div>
		             <%@ include file="/pages/safeai/jsp/common/page.jsp"%>&nbsp;&nbsp;&nbsp;&nbsp;
				</td> 
	        </tr>
	    </table>
    </form>
</body>
</html>